/**
 * @description  : 审批--退回
 * @descriptionDetail : 审批--退回
 * @copyright    : 浙江烟草
 * @author       : mc
 * @create       : 2022-11-05 09:45:58
 */
<template>
  <view class="page">
    <!-- #ifdef H5-ONLY -->
    <theme-navbar :is-white="false" :title="navTitle" :custom-back="goBack" style="z-index: 99999">
    </theme-navbar>
    <!-- #endif -->
    <view class="content u-page">
      <view class="lay-root">
        <view class="lay-title">
          <text>
            退回到修改
          </text>
        </view>
      </view>
      <view class="lay-root">
        <u-input type="textarea" placeholder="请输入退回原因" v-model="remark"></u-input>
      </view>
      <u-line :color="$theme.u_border_color"></u-line>
    </view>

    <view class="btm-lay">
      <u-button plain size="default" type="error" @click="resetData()">
        重置
      </u-button>
      <u-button size="default" type="primary" @click="confirmBack()">
        确认
      </u-button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      remark: "",
      backFlag: "3",
    }
  },
  methods: {
    resetData() {
      this.backFlag = "3";
      this.remark = "";
    },
    confirmBack() {
      if (this.$u.test.isEmpty(this.remark)) {
        this.$modal.alert("请输入退回原因");
        return;
      }
      this.backPrev({
        paramKey: "backApprove",
        param: {
          backFlag: this.backFlag,
          remark: this.remark,
        },
      });
    },
  },
}
</script>

<style scoped lang="scss">
	.content {
		background-color: #FFF;
	}

	.lay-root {
		width: 100%;
		padding: 40rpx 30rpx;
		display: inline-flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.lay-title {
		align-self: center;
		flex-shrink: 0;
		font-size: 34rpx;
    color: #333333;
    font-weight: bold;
	}

	.lay-content {}

	.btm-lay {
		display: flex;
		flex-direction: row;
		position: fixed;
		bottom: 0;
		width: 100%;
		padding: 20rpx 0;
	}
	/deep/uni-button{
		width: 40%;
	}
</style>
